import {appApiBaseUrl} from '../config/constant.config';

// 基础模块
export const baseLang = {
  module:{
    list:'/baseLang/module/list'
  },
  statusCode: {
    list:'/baseLang/statusCode/list'
  },
};

export const baseDoc={
  url:'/baseDoc/docApi'
}

export const fileManager = {
  url:"/file/manager/list",
  uploadUrl:'/file/upload',// 文件上传
  fileUploadTypeUrl:"/file/findUploadTypes",// 获取上传类型
  fileBaseUrl:'/file/view',
  filePrewUrl:'/file/prew',

};

export const common = {
  login: '/sys/login',// 登录
  logout: '/sys/logout', // 退出
  init: '/common/sys/init',// 初始化系统
  dulicateCheck:'/common/duplicate/check'
};

export const userInfo = {
  getPermission: '/sys/permission/getUserPermission', // 获取权限
  getUserInfo:'/sys/user/getCurrent',
  refreshUserPermission:'/sys/user/refreshUserInfo'
}

// 登录退出url
export const SysLoginUrl={
  login: '/sys/login',// 登录
  logout: '/sys/logout', // 退出
}
// 系统角色
export const sysRoleUrl= {
  list: '/sys/role/list',
  delete: '/sys/role/del',
  add:'/sys/role/add',
  edit:'/sys/role/edit',
  deleteBatch:"/sys/role/delBatch",
  import:"/sys/role/importExcel",
  export:"/sys/role/exportExcel",
  named:"/sys/role/named",
  saveRolePermission:'/sys/role/saveRolePermission',// 修改角色权限
  grantUser:'/sys/role/grantUser', //授权
  deleteUser: '/sys/role/deleteUser',
  deleteUserBatch: '/sys/role/deleteUserBatch',
  findDataRangeByName:'/sys/dataRange/findByName',
};


export const sysPermissionUrl={
  list: '/sys/permission/list',
  add: '/sys/permission/add',
  edit: '/sys/permission/edit',
  delete: '/sys/permission/del',
  deleteBatch: '/sys/permission/delBatch',
  tree:'/sys/permission/tree',
  queryRolePermission:'/sys/permission/queryRolePermission',// 按照roleId 查询权限id
}


/**
 * 系统用户URL
 * @type {{add: string, named: string, getPermission: string, findByIds: string, import: string, edit: string, changPassword: string, list: string, roleList: string, delete: string, deleteBatch: string, getUsernamesByIds: string, frozenBatch: string, updateUserPassword: string, findById: string, getUserInfo: string, export: string}}
 */
export const SysUserUrl = {
  getUserInfo:'/sys/user/getCurrent',// 获取当前人信息
  getPermission: '/sys/permission/getUserPermission', // 获取当前人权限
  add:'/sys/user/add',
  edit:'/sys/user/edit',
  list: '/sys/user/list',
  delete:'/sys/user/del',
  deleteBatch: '/sys/user/delBatch',
  roleList: '/sys/user/userRoleList',
  getUsernamesByIds:'/sys/user/getUsernamesByIds',
  changPassword:'/sys/user/changPassword', // 重置密码
  frozenBatch: '/sys/user/frozenBatch', // 批量冻结和解冻
  updateUserPassword: "/sys/user/updatePassword",// 更新用户密码
  import: '/sys/user/importExcel',
  export:'/sys/user/exportExcel',
  named:'/sys/user/named',
  findByIds:'/sys/user/findByIds',
  findById:'/sys/user/findById',
}

/**
 * @deprecated
 * @see SysUserUrl
 * @type {{add: string, named: string, findByIds: string, import: string, edit: string, changPassword: string, list: string, roleList: string, delete: string, deleteBatch: string, getUsernamesByIds: string, frozenBatch: string, updateUserPassword: string, findById: string, export: string}}
 */
export const sysUserUrl = SysUserUrl



export const baseRegionUrl={
  add:'/sys/base/region/add',
  edit:'/sys/base/region/edit',
  list: '/sys/base/region/list',
  delete:'/sys/base/region/del',
  deleteBatch: '/sys/user/deleteBatch',
  tree: '/sys/base/region/tree',
  dict:'/common/base/region/dict',
  init:'/sys/base/region/init',
};

export const sysDictUrl={
  list: '/base/dict/list',
  getDictItems: '/base/dict/getDictItems/',// 按照code 后去item
};
export const sysDepartUrl={
  add: "/sys/depart/add",
  edit: '/sys/depart/edit',
  delete: '/sys/depart/del',
  deleteBatch:'/sys/depart/delBatch',
  list: '/sys/depart/list',
  tree: '/sys/depart/tree',
  import:"/sys/depart/importExcel",
  export:"/sys/depart/exportExcel",
};
export const sysQuartzJobUrl={
  add: "/sys/quartzJob/add",
  edit: '/sys/quartzJob/edit',
  delete: '/sys/quartzJob/delete',
  list:'/sys/quartzJob/list',
  pause: "/sys/quartzJob/pause",
  resume: "/sys/quartzJob/resume",
  execute:"/sys/quartzJob/execute"
};

export const sysLogUrl = {
  delete: '/sys/log/delete',
  list:'/sys/log/list',
  deleteBatch: '/sys/log/deleteBatch',
  cleanCache:'/sys/log/cleanUrlLogInfoCache'
};





export const codeGenClassUrl={
  list:'/codegen/entity/list',
  add:'/codegen/entity/add',
  edit:'/codegen/entity/edit',
  delete:'/codegen/entity/del',
  deleteBatch:'/codegen/entity/delBatch',
  findFieldClassByFieldType:'/codegen/fieldClass/findByFieldType',
  findInputTypeByFieldType:'/codegen/inputType/findByFieldType',
  findFieldsByEntityClass:'/codegen/fieldClass/findFieldsByEntityClass',
  gen:'/codegen/entity/gen'
};

export const TestUserEntityUrl={
  list:"/sys/codegen/test/user/list",
  add: "/sys/codegen/test/user/add",
  edit: '/sys/codegen/test/user/edit',
  delete: '/sys/codegen/test/user/del',
  deleteBatch: '/sys/codegen/test/user/delBatch',

};

// 工作流模型
export const activitModelUrl = {
  add:"/activiti/model/add",
  list:'/activiti/model/list',
  delete:'/activiti/model/delete',
  deleteBatch:'/activiti/model/deleteBatch',
  deployment:'/activiti/model/deployment',
  img:'/activiti/model/getPngResource',
  edit:'/activiti/model/edit',
  updateVersion:'/activiti/model/updateVersion',
  named:'/activiti/model/named'
}

// 工作流模型
export const activitFormDesignlUrl = {
  add:"/activiti/formDesign/add",
  list:'/activiti/formDesign/list',
  delete:'/activiti/formDesign/delete',
  deleteBatch:'/activiti/formDesign/deleteBatch',
  edit:'/activiti/formDesign/edit',
  getDesignContent:'/activiti/ueditor/activitiFormDesign.html'
}

// 工作流定义
export const activitiProcessDefinitionUrl = {

  list:'/activiti/processDefinition/list',
  delete:'/activiti/processDefinition/delete',
  deleteBatch:'/activiti/processDefinition/deleteBatch',
  resource:'/activiti/processDefinition/resource',
  exportResouce:'/activiti/processDefinition/exportResource'
}

// 工作流表单
export const activitiFormUrl = {

  getStartFormInfo:'/activiti/form/getStartFormInfo',
  taskFormSubmit:'/activiti/form/taskFormSubmit',// 已过时， 后台此方法不能记录任务id,使用activitiTaskUrl.complate
  startProcess:'/activiti/form/startProcess',
  getTaskFormInfo:'/activiti/form/getTaskFormInfo',
  exportResouce:'/activiti/processDefinition/exportResource'
}

// 工作流实例
export const activitiProcessInstanceUrl = {

  list:'/activiti/processInstance/list',
  delete:'/activiti/processInstance/delete',
  deleteBatch:'/activiti/processInstance/deleteBatch',
  updateName:'/activiti/processInstance/updateName',
  getDetailInfo:'/activiti/processInstance/getDetailInfo',
  getFlowImg:'/activiti/processInstance/getFlowImg',
  findById:'/activiti/processInstance/findById'
}

// 我的任务
export const activitiMyTaskUrl = {

  list:'/activiti/task/listCurrentUserTask',
}

// 任务
export const activitiTaskUrl = {
  list:'/activiti/task/listUserTask',
  delete:'/activiti/task/del',// 删除， 已过期 运行中的任务不能删除
  delegate:'/activiti/task/delegate', // 委派
  resolve:'/activiti/task/resolve', // 委派完成
  complate:'/activiti/task/complate', // 完成
}

/**
 * 历史流程
 *
 */
export const activitiHistoryProcessUrl ={
  list:'/activiti/history/listHistoryProcessInstance',
  getFlowImg:'/activiti/history/getFlowImg',
  delete:'/activiti/history/delHistoryProcessInstance',
  deleteBatch:'/activiti/history/delBatchHistoryProcessInstance',
  getDetailInfo:'/activiti/history/getDetailInfo'
}

// cms实例
export const cmsUrl = {

  list:'/cms/info/list',
  add:'/cms/info/add',
  edit:'cms/info/edit',
  delete:'/cms/info/del',
  deleteBatch:'/cms/info/delBatch',
  named:'/cms/info/named',
}

// cms实例
export const cmsMenuUrl = {

  list:'/cms/menu/list',
  add:'/cms/menu/add',
  edit:'cms/menu/edit',
  delete:'/cms/menu/del',
  deleteBatch:'/menu/info/delBatch',
  named:'/cms/menu/named',
  getContentHtml:'/cms/menu/getContentHtml'
}


